#!/bin/bash
set -e

if [ "$#" -ne 2 ]; then
  echo "Usage: $0 zsync_url_1 zsync_url_2"
  exit 1
fi
rm *.gz || true
f=$(./zsync_curl $1 | grep Target | awk '{print $2}' | tail -1)
./zsync_curl -i $f $2
